package org.example;

import java.io.IOException;

import javax.servlet.annotation.WebServlet;

@WebServlet("resumeServlet")
public class ResumeServlet extends HttpServlet {

	public ResumeServlet() {
	}

	@Override
	public void destory() throws Exception {
	}

	@Override
	public void init() throws Exception {
	}

	@Override
	public void doGet(Request request, Response response) {
		System.out.println(">> doGet");
		String content = "<h1>doGet</h1>";
		content = content + String.format("<h1>request.Url=%s</h1>", request.getUrl());
		try {
			response.output(HttpProtocolUtil.getHttpHeader200() + content);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

	@Override
	public void doPost(Request request, Response response) {
		System.out.println(">> doPost");
		String content = "<h1>doPost</h1>";
		content = content + String.format("<h1>request.Url=%s</h1>", request.getUrl());
		try {
			response.output(HttpProtocolUtil.getHttpHeader200() + content);
		} catch (IOException e) {
			e.printStackTrace();
		}
	}

}
